package logic.weapons;

import fileHandling.language.properties.WeaponProps;
import logic.nodes.nodeSettings.DamagableSettings;
import logic.nodes.nodeSettings.upgrades.UpgradableSettings;

public class WeaponProperties extends DamagableSettings {
	
	public static final String WEAPON_NAME = "Name";
	
	public WeaponProperties(UpgradableSettings settings) {
		super(settings);
	}
	
	public float getShootRate() { return Float.valueOf(getValueOf(WeaponProps.ShootRate)).floatValue(); }
	
	public int getRequiredEnergy() { return Integer.valueOf(getValueOf(WeaponProps.RequiredEnergy)).intValue(); }
	
	public String getType() { return getValueOf(WeaponProps.WeaponType); }
	
	public int getDamage() { return Integer.valueOf(getValueOf(WeaponProps.Damage)).intValue(); }
	
	public float getSpeed() { return Float.valueOf(getValueOf(WeaponProps.WeaponFireSpeed)).floatValue(); }
	
	public boolean dealsSplashDamage() { return getValueOf(WeaponProps.SplashDamageRadius) != null; }
	
	public float getSplashDamageRadius() { return Float.valueOf(getValueOf(WeaponProps.SplashDamageRadius)).floatValue(); }
	
	public String getWeaponName() { return getValueOf(WEAPON_NAME); }
}